package com.bigbirdmen.cloud.websocket.filter;

import org.springframework.context.annotation.ComponentScan;
import org.springframework.stereotype.Component;

import javax.servlet.*;
import javax.servlet.annotation.WebFilter;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;

/**
 * @Author: bzq
 * @Date: 2022/3/3 16:45
 * @Description:
 */
@Component
public class WsUrlFilter implements Filter {

	@Override
	public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
		HttpServletRequest httpServletRequest = (HttpServletRequest) request;
		StringBuffer requestURL = httpServletRequest.getRequestURL();
		System.err.println(requestURL);
		chain.doFilter(request,response);
	}
}